<?php

namespace DesignNew\ChainOR;

require('../vendor/autoload.php');

class ChainClient{

    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
       $bank = new Bank(100);
       $paypal = new Paypal(200);
       $bitcoin = new Bitcoin(300);

       $bank->setNext($paypal);
       $paypal->setNext($bitcoin);

       $bank->pay(259);
       
    }
}

$client = new ChainClient();